package com.xuecheng.content.model.dto;

import com.xuecheng.base.exception.ValidatedGroups;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;

/**
 * @author 勾新杰
 * @version 1.0
 * @description 增加或者修改课程计划
 * @date 2024/12/21 16:41
 */
@Data
@ApiModel(value = "保存或修改课程计划")
public class SaveOrUpdateTeachPlanDTO {

    /**
     * 教学计划id
     */
    @ApiModelProperty(value = "教学计划id")
    @NotNull(message = "id不能为空", groups = {ValidatedGroups.Update.class})
    private Long id;

    /**
     * 课程计划名称
     */
    @ApiModelProperty(value = "课程计划名称")
    @NotEmpty(message = "课程计划名称不能为空", groups = {ValidatedGroups.Insert.class})
    private String pname;

    /**
     * 课程计划父级Id
     */
    @ApiModelProperty(value = "课程计划父级Id")
    @NotNull(message = "课程计划父级Id不能为空", groups = {ValidatedGroups.Insert.class})
    private Long parentid;

    /**
     * 层级，分为1、2、3级
     */
    @ApiModelProperty(value = "层级，分为1、2、3级")
    @NotNull(message = "层级不能为空", groups = {ValidatedGroups.Insert.class})
    private Integer grade;

    /**
     * 课程类型:1视频、2文档
     */
    @ApiModelProperty(value = "课程类型:1视频、2文档")
    private String mediaType;

    /**
     * 课程标识
     */
    @ApiModelProperty(value = "课程标识")
    @NotNull(message = "课程标识不能为空", groups = {ValidatedGroups.Insert.class})
    private Long courseId;

    /**
     * 课程发布标识
     */
    @ApiModelProperty(value = "课程发布标识")
    private Long coursePubId;

    /**
     * 是否支持试学或预览（试看）
     */
    @ApiModelProperty(value = "是否支持试学或预览（试看）", required = true)
    private String isPreview;
}
